package com.youpai.platform.chat.web.api;

import com.youpai.platform.chat.service.service.ChatPageService;
import com.youpai.platform.chat.web.entity.req.GetChatDetailPageReq;
import com.youpai.platform.chat.web.entity.resp.GetChatDetailPageResp;
import com.youpai.platform.common.entity.resp.BaseResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @date: 2022/7/23 16:12
 * @author: Anna
 * @version: 1.0
 * @description: 聊天页面接口
 */
@Slf4j
@RestController
@RequestMapping(value = "/chat/page")
@Api(value = "ChatPageController", tags = "聊天页面接口")
public class ChatPageController {

    @Resource
    private ChatPageService chatPageService;

    @ApiOperation(value = "查询聊天页面信息")
    @PostMapping(value = "/init")
    public BaseResponse<GetChatDetailPageResp> getChatDetailPage(@RequestBody GetChatDetailPageReq req){
        return BaseResponse.success(chatPageService.getChatDetailPage(req));
    }
}
